/* 
 * File:   oclFFT.h
 * Author: cbender
 *
 * Created on 5. September 2014, 16:21
 */

#ifndef CPUFFT_H
#define	CPUFFT_H
#include "structs.h"
#include "oclDistroFix.h"
#include <climits>
#include <inttypes.h>
#include <chrono>

class cpuFFT {
public:
    // constructors, destructors
    cpuFFT();
    cpuFFT(const cpuFFT& orig);
    virtual ~cpuFFT();
    // Getters, setters
    void setInput(input_data* input);
    // Functions
    isotope* calculate();
private:
    double getGreatestAbsNegativeValue();
    void calculations();
    isotope* copyResult();
    void calculateMassRange();
    void calculateFrequency();
    void reset();
    void fft();
    void convertMass();
    //Data Members:
    input_data* input;
    gpu_input_data* gpuInput;
    isotope* result;
    clcomplex* frequencyData;
};

#endif	/* CPUFFT_H */

